import urllib.request
import os
dirname='c:\\test'
if not os.path.isdir(dirname):
    os.mkdir(dirname)
os.chdir('c:\\test')
for eachx in range(100,1000,100):
    for eachy in range(100,1000,100):
        response = urllib.request.urlopen('http://placekitten.com/g/'+str(eachx)+'/'+str(eachy))
        print (response)
        cat_img=response.read()

        filename= 'cat_' + str(eachx) + '_'+str(eachy) + '.jpg'
        with open(filename,'wb') as f:
            f.write(cat_img)
